

package com.hazelcast.transaction;

import com.hazelcast.core.DistributedObject;

import javax.annotation.Nonnull;
import javax.transaction.xa.XAResource;

/**
 * Interface for providing Hazelcast as an XAResource
 */
public interface HazelcastXAResource extends XAResource, DistributedObject {

    /**
     * Returns the TransactionContext associated with the current thread.
     *
     * @return TransactionContext associated with the current thread
     * @throws IllegalStateException if no context found
     */
    @Nonnull
    TransactionContext getTransactionContext();


}
